syntax = "proto3";

package spqr;

option go_package = "spqr/proto";

message ShardingRuleEntry {
  string column = 2 [deprecated = true];
  string hashFunction = 3 [deprecated = true];
}


message ShardingRule {
  string id = 1 [deprecated = true]; 
  string tableName = 2 [deprecated = true];
  repeated ShardingRuleEntry ShardingRuleEntry = 3 [deprecated = true];
  string distributionId = 4 [deprecated = true];
}

message AddShardingRuleRequest {
  repeated ShardingRule rules = 1;
}

message AddShardingRuleReply {}

message ListShardingRuleRequest {
  string distribution = 1;
}

message ListShardingRuleReply {
  repeated ShardingRule rules = 1;
}

message DropShardingRuleRequest {
  repeated string id = 1;
}

message DropShardingRuleReply {}

service ShardingRulesService {
  rpc AddShardingRules(AddShardingRuleRequest) returns (AddShardingRuleReply) {
      option deprecated = true;
  }
  rpc DropShardingRules(DropShardingRuleRequest) returns (DropShardingRuleReply) {
    option deprecated = true;
  }
  rpc ListShardingRules(ListShardingRuleRequest) returns (ListShardingRuleReply) {
    option deprecated = true;
  }
}
